#!/usr/bin/env bash
yum groupinstall 'Development Tools'
yum -y install libX11-devel freetype-devel zlib-devel libxcb-devel
yum -y install wine
yum -y install libpng-devel
su -c "yum install gnutls-devel.i686"
set -e
mkdir -p /opt/tmp
mkdir -p /usr/local/Wine/share/wine/mono
mkdir -p /usr/local/Wine/share/wine/gecko
wget https://dl.winehq.org/wine/source/3.0/wine-3.0.tar.xz
tar xvf wine-3.0.tar.xz
mv wine-3.0.tar.xz /opt/tmp
mv wine-3.0 /opt/wine
cd /opt/wine
./configure  --enable-win64
make && make install
#
#su -c "yum install gcc flex-devel \
#flex-devel.i686 flex bison xorg*.i686 \
#freetype-devel.i686 \
#install alsa-lib-devel.i686 \
#libsndfile-devel.i686 \
#readline-devel.i686 \
#glib2.i686 glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 \
#pulseaudio-libs-devel.i686 audiofile-devel.i686 \
#cmake \
#freeglut-devel.i686 \
#libieee1284-devel.i686
#openldap-devel.i686 \
#unixODBC-devel.i686 \
#sane-backends-devel.i686 \
#fontforge \
#libgphoto2-devel.i686 \
#isdn4k-utils-devel.i686 \
#mesa-libGL-devel.i686 mesa-libGLU-devel.i686 \
#libXxf86dga-devel.i686 libXxf86vm-devel.i686 \
#giflib-devel.i686 \
#cups-devel.i686 \
#gsm-devel.i686 \
#libv4l-devel.i686 \
#fontpackages-devel \
#ImageMagick-devel.i686 \
#libX11-devel.i686 \
#docbook-utils-pdf \
#libtextcat tex-cm-lgc \
#libXcursor-devel.i686 libXcursor \
#libXi-devel.i686 libXi.i686 \
#xcb-util-image.i686 \
#libXrandr-devel.i686 \
#libXinerama-devel \
#libXcomposite.i686 libXcomposite-devel.i686 \
#mesa-libOSMesa.i686 mesa-libOSMesa-devel.i686 \
#libpcap-devel.i686 \
#dbus-devel.i686 dbus-libs.i686 dbus-glib-devel.i686 dbus-glib.i686 \
#ncurses-devel.i686 \
#libgphoto2.i686 libgphoto2-devel.i686 \
#lcms2-devel.i686 \
#libzip-devel.i686 libzip.i686 \
#gstreamer-devel.i686 gstreamer.i686 \
#fontconfig-devel.i686 \
#libtiff-devel.i686 \
#prelink \
#libXrender-devel.i686 \
#libxml2-devel.i686 \
#libxslt-devel.i686 libxslt.i686 \
#libjpeg-turbo-devel.i686 \
#libpng-devel.i686 \
#samba-winbind-clients.x8664 \
#openssl098e.i686 \
#gnutls-devel.i686"

